<?php

class GoodStudentList extends Controller {

	function GoodStudentDetail()
	{
		parent::Controller();
	}

	function index()
	{
	 	if ($this->session->userdata('logged_in') != TRUE)
	    {
	        redirect('login/index');
	    }
	    $this->load->model('GoodStudentModel');
	    $data['data'] = $this->GoodStudentModel->getGoodStudent();

		$this->load->view('header');
		$this->load->view('good-student-list-form', $data);
		$this->load->view('footer');
	}
	
	function saveSuccess()
	{
	    $this->load->model('GoodStudentModel');
	    $data['data'] = $this->GoodStudentModel->getGoodStudent();
		$msg['msg'] = "บันทึกข้อมูลเรียบร้อย";
		$this->load->view('header');
		$this->load->view('good-student-list-form', $data);
		$this->load->view('footer', $msg);
	}
	
}

